package org.jianfa.homework.dubbo.provider.impl;

import org.apache.dubbo.rpc.RpcContext;
import org.jianfa.learn.dubbo.api.HelloService;

public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name) {
        String remoteAddr = RpcContext.getContext().getAttachment("remoteAddr");
        System.out.println("来自客户端" + remoteAddr + "的请求: " + name);
        return "Hello " + name;
    }
}
